package models.dao;

import java.sql.ResultSet;
import java.util.ArrayList;

import model.pojo.*;
import model.util.MySqlDataAccessHelper;


public class Ac_LanguageDAO {
	public ArrayList<AcLanguage> getAllLanguage(){
		ArrayList<AcLanguage> list=new ArrayList<AcLanguage>();

    	MySqlDataAccessHelper helper = new MySqlDataAccessHelper();
        try {
        	helper.open();
            ResultSet rs=helper.executeQuery("select * from ac_language");
            while (rs.next()) {
            	AcLanguage c1=new AcLanguage(rs.getString("LangID"), rs.getString("LangName"));		
        		
                list.add(c1);
            }
            rs.close();
        } catch (Exception e) {
        	e.printStackTrace();
        }finally{

            helper.close();
        }
		return list;
	}
}
